<?php
/**
 * Created by PhpStorm.
 * User: zcq
 * Date: 2018/10/15
 * Time: 16:07
 */

namespace app\index\service;


use app\common\RedisCache;

class BaseService
{
    public function __construct()
    {

    }

    //清除投票redis缓存
    public function clearVoteItems($voteId)
    {
        $key = 'vote_items_'.$voteId;
        return RedisCache::getInstance()->cache($key,null);
    }

    /**
     * @param $voteItemId
     * 清除某个参与投票活动的数据的评论
     */
    public function clearComment($voteItemId)
    {
        $key = 'comment_'.$voteItemId;
        return RedisCache::getInstance()->cache($key,null);
    }
}